from urllib.request import urlopen
from bs4 import BeautifulSoup
import re


# 打开网页
html = urlopen("https://mofanpy.com/static/scraping/table.html").read().decode('utf-8')
# 解析html
soup = BeautifulSoup(html,features='lxml')
# 正则
img_links = soup.findAll("img",{'src':re.compile('.*?\.jpg')})
# 遍历
for link in img_links:
    print(link['src'])